/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.uml_generator.manager;

import com.genia.toolbox.basics.exception.technical.TechnicalIOException;
import com.genia.toolbox.uml_generator.model.AbstractJavaObject;
import com.genia.toolbox.uml_generator.model.AbstractObject;

/**
 * Utility class to generate decorated {@link AbstractObject}.
 */
public interface ModelDecorator
{

  /**
   * generate a decorated {@link AbstractObject}.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @param nameSuffix
   *          the suffix to add to the name of the object
   * @param packageNameSuffix
   *          the package suffix to add to the package of the object
   * @return a decorated object
   */
  public <T extends AbstractObject> T getDecoratedObject(T originalObject, String nameSuffix, String packageNameSuffix);



  /**
   * generate a decorated {@link AbstractObject} for the delegate.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getDelegateObject(T originalObject);



  /**
   * generate a decorated {@link AbstractObject} for the mapping.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getMappingObject(T originalObject);



  /**
   * generate a decorated {@link AbstractObject} for the implementation.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getImplementationObject(T originalObject);



  /**
   * generate a decorated {@link AbstractObject} for a plurar.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getPluralObject(T originalObject);



  /**
   * returns a decorated {@link AbstractObject} that is a generic version of an
   * existent object.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @param types
   *          the type to add as generic parameters
   * @return a decorated object
   * @throws TechnicalIOException
   *           when an I/O error occurred
   */
  public <T extends AbstractObject> T getGenericObject(T originalObject, AbstractJavaObject... types)
      throws TechnicalIOException;



  /**
   * generate a decorated {@link AbstractObject} for the internal object.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getInternalObject(T originalObject);



  /**
   * generate a decorated {@link AbstractObject} for the dependency object.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getDependencyObject(T originalObject);



  /**
   * generate a decorated {@link AbstractObject} for the message object.
   * 
   * @param <T>
   *          the type of the object to decorate
   * @param originalObject
   *          the object to decorate
   * @return a decorated object
   */
  public <T extends AbstractObject> T getMessagesObject(T originalObject);
}
